package com.zoweunion.mechanic.service.app;

import com.zoweunion.mechanic.model.User;
import com.zoweunion.mechanic.model.app.ViewBoardMenu;
import com.zoweunion.mechanic.util.MyException;

import java.util.List;
import java.util.Map;

/**
 * @author zhangjun
 */
public interface ToolViewBoardService {

    /**
     * 今日统计（今日预约，今日完成，今日受理）
     * @return
     */
    Map<String, Object> todayStatistics(User user);

    /**
     * 获取工单列表
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> listOrderInfo(User user, Map<String, Object> reqMap);

    List<Map<String, Object>> listByFault(List<Map<String, Object>> maps,String sId);

    /**
     * 主页 实时工单（临时展示和更多展示）
     * @param user
     * @return
     */
    List<Map<String, Object>> listRealTimeOrder(User user, Map<String, Object> reqMap);

    /**
     * 获取应用菜单列表
     * @param user
     * @return
     */
    List<ViewBoardMenu> listMenu(User user);

    /**
     * 故障类型统计 饼图
     * 车主和服务商页面之间的区别，就在于是否传递oId,传参就是车主页面
     * @param user
     * @return
     */
    List<Map<String, Object>> pieFaultTypeStatistics(User user, Map<String, Object> reqMap);

    /**
     * 工单类型统计 饼图
     * 车主和服务商页面之间的区别，就在于是否传递oId,传参就是车主页面
     * @param user
     * @return
     */
    List<Map<String, Object>> pieOrderTypeStatistics(User user, Map<String, Object> reqMap);

    /**
     * 工单统计
     * @param user
     * @param reqMap
     * @return
     */
    Map<String, Object> getOrderStatisticsData(User user, Map<String, Object> reqMap);

    /**
     * 工单统计-柱状图
     * @param user
     * @param reqMap
     * @return
     */
    Map<String, Object> orderStatisticsHistogram(User user, Map<String, Object> reqMap);

    /**
     * 维修统计-工单统计(完成工单，返修率，均维修时间)
     * @param user
     * @param reqMap
     * @return
     */
    Map<String, Object> getRepairOrderStatistics(User user, Map<String, Object> reqMap);

    /**
     * 维修统计-修工综合能力排名
     * @param user
     * @param reqMap
     * @return
     */
    Map<String, Object> listMaintainRepairAbility(User user, Map<String, Object> reqMap);

    /**
     * 额度预警-信用额度预警
     * @param user
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> listOrderWarningCreditAmount(User user, Map<String, Object> reqMap);

    /**
     * 营收统计-营收统计
     * @param user
     * @param reqMap
     * @return
     */
    Map<String, Object> getPaymentStatistics(User user, Map<String, Object> reqMap);

    /**
     * 营收统计-营收情况
     * @param user
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> getRevenueStatistics(User user, Map<String, Object> reqMap) throws MyException;

    /**
     * 营收统计-支付类型统计
     * 车主和服务商页面之间的区别，就在于是否传递oId,传参就是车主页面
     * @param user
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> getPaymentTypeStatistics(User user, Map<String, Object> reqMap);

    /**
     * 客户统计-客户统计
     * @param user
     * @param reqMap
     * @return
     */
    Map<String, Object> getCustomerStatistics(User user, Map<String, Object> reqMap);

    /**
     * 客户统计-客户分布柱状图
     * @param user
     * @param reqMap
     * @return
     */
    Map<String, Object> getCustomerDistributedStatistics(User user, Map<String, Object> reqMap);

    /**
     * 客户分布-客户总数列表
     * @param user
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> listCustomerTotalOrder(User user, Map<String, Object> reqMap);

    /**
     * 客户统计-需维护客户列表
     * @param user
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> listNeedMaintainCustomer(User user, Map<String, Object> reqMap);

    /**
     * 获取用户信息
     * @param user
     * @param reqMap
     * @return
     */
    Map<String, Object> getUserInfoByUserId(User user, Map<String, Object> reqMap);

    /**
     * 根据userid获取车辆列表
     * @param user
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> listCarByUserId(User user, Map<String, Object> reqMap);

    /**
     * 根据userid获取车辆列表
     * @param user
     * @param reqMap
     * @return
     */
    List<Map<String, Object>> listCarByUserIdNew(User user, Map<String, Object> reqMap) throws MyException;

    /**
     * app端看板获取管辖区域
     * @param map
     * @return
     */
    Map<String, Object> getPrecinctRegionForApp(User currentUser, Map<String, Object> map);

}
